package com.kaiyidiannao.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 * Created by david on 2014/6/30.
 * 解决lsitview 嵌套 listveiw 高度计算错误，使用的lsitview
 */
public class MyListview2 extends ListView {

    public MyListview2(Context context) {
        super(context);
    }

    public MyListview2(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyListview2(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
